package sum.book.order.api.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import sum.book.common.core.model.dto.SimpleEntity;
import sum.book.order.api.fallback.BookOrderServerFallbackFactory;

/**
 * @Auther: ZhangGN
 * @Description: Client
 * @Date 2022/12/2 12:58
 **/
@FeignClient(value = "book-order-server", fallbackFactory = BookOrderServerFallbackFactory.class)
public interface BookOrderServerClient {
    @RequestMapping(
            method = RequestMethod.GET,
            value = "/order/feign/test",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    SimpleEntity<String> testFallback();
}
